# #!/usr/bin/env python
# # -*- coding:utf-8 -*-
# # @FileName  :draw_out.py
# # @Time      :2024/9/5 19:44
# # @Author    :YKW
# import numpy as np
# import matplotlib.pyplot as plt
#
# # 参数设置
# a = 0
# b = 1.7 / (2 * np.pi)  # 螺距为1.7米
# theta = np.linspace(0, 10 * np.pi, 1000)
#
# # 计算等距螺线的极径
# r = a + b * theta
#
# # 转换为直角坐标系
# x = r * np.cos(theta)
# y = r * np.sin(theta)
#
# # 计算中心对称的图形
# x_symmetric = -x
# y_symmetric = -y
#
# # 创建图形
# plt.figure(figsize=(8, 8))
#
# # 绘制圆形空间
# circle = plt.Circle((0, 0), 4.5, color='blue', fill=False)
# plt.gca().add_artist(circle)
#
# # 找到螺线与圆的交点
# def find_intersections(x, y, radius):
#     intersections = []
#     for i in range(len(x) - 1):
#         if (x[i]**2 + y[i]**2 <= radius**2) and (x[i+1]**2 + y[i+1]**2 > radius**2):
#             intersections.append((x[i], y[i]))
#             break
#     return intersections
#
# radius = 4.5
# intersections_a = find_intersections(x, y, radius)
# intersections_b = find_intersections(x_symmetric, y_symmetric, radius)
#
# # 绘制等距螺线a（交点以外部分）
# if intersections_a:
#     plt.plot(x[x.tolist().index(intersections_a[0][0]):], y[y.tolist().index(intersections_a[0][1]):], label='Spiral a')
# else:
#     plt.plot(x, y, label='Spiral a')
#
# # 绘制中心对称的图形b（交点以外部分）
# if intersections_b:
#     plt.plot(x_symmetric[x_symmetric.tolist().index(intersections_b[0][0]):], y_symmetric[y_symmetric.tolist().index(intersections_b[0][1]):], label='Spiral b', linestyle='--')
# else:
#     plt.plot(x_symmetric, y_symmetric, label='Spiral b', linestyle='--')
#
# # 计算两个半圆的半径和位置
# r_d = 1.5  # 半圆d的半径
# r_e = 0.75  # 半圆e的半径
#
# # 确保半圆d与螺线a相切，半圆e与螺线b相切
# # 这里假设半圆d和半圆e的圆心在x轴上，且半圆d在右侧，半圆e在左侧
# center_d = (4.5 - r_d, 0)
# center_e = (-4.5 + r_e, 0)
#
# # 绘制两个半圆
# theta_circle = np.linspace(np.pi, 2 * np.pi, 100)
# x_circle_d = center_d[0] + r_d * np.cos(theta_circle)
# y_circle_d = center_d[1] + r_d * np.sin(theta_circle)
# x_circle_e = center_e[0] + r_e * np.cos(theta_circle)
# y_circle_e = center_e[1] + r_e * np.sin(theta_circle)
#
# plt.plot(x_circle_d, y_circle_d, 'g-')
# plt.plot(x_circle_e, y_circle_e, 'g-')
#
# # 设置图形属性
# plt.title('Spirals a and b with Semicircles d and e')
# plt.xlabel('x')
# plt.ylabel('y')
# plt.axis('equal')
# plt.grid(True)
# plt.legend()
#
# # 显示图形
# plt.xlim(-10, 10)
# plt.ylim(-10, 10)
# plt.show()
a = 10


def t():
    global a
    a=101
if __name__ == "__main__":
    a=1011

    print(a)
    # a = 101
    t()
    print(a)
